// 用户相关接口
import service from '@/api/common'


export default {
  getEnums(params) {
    const resp = service.get('/api/v1/enum', { params: params })
    return resp
  },

  addEnum(enum_) {
    const resp = service.post(`/api/v1/enum`, enum_)
    console.log(resp)
    return resp
  },

  updateEnum(enum_) {
    const resp = service.patch(`/api/v1/enum/${enum_.id}`, enum_)
    console.log(resp)
    return resp
  },

  deleteEnum(id) {
    const resp = service.delete(`/api/v1/enum`, { 'data': { 'ids': [id] } })
    console.log(resp)
    return resp
  }
}